
import { createStore } from 'vuex'
// import { createStore } from './mini-vuex'

const store = createStore({
    state() {
        return {
            count: 666
        }
    },
    mutations: {
        add(state) {
            state.count++
        }
    },
    actions: {
        asyncAdd({ commit }) {
            setTimeout(() => {
                commit('add')
            }, 1000)
        }
    }
})
export default store